class Card {
	int rank;
	String suit;
	
	Card(int  rank, String suit) throws BadugiException {
		if (rank < 0 || rank >= 13) {
			throw new BadugiException("No such card");
		}
		else 
			this.rank = rank;
		if (suit != "C" && suit != "H" && suit != "D" && suit != "S") {
			throw new BadugiException("No such card");
		}
		else
			this.suit = suit;
	}
	
	public String toString() {
		return Integer.toString(rank) + suit;
	}
	
	void printCard() {
		System.out.print(Integer.toString(rank) + suit);
	}
	
	String getSuit() {
		return suit;
	}
	int getRank() {
		return rank;
	}
	
}